
program chapter5_16.1
    implicit none
    integer i, j, mul, sumup
    print *, 'sum up the value of n! , n in range 1-10'
    i=1
    j=1
    mul=1
    sumup=0
10    if (i .LT. 11) then
            i=i+1

20           if (j .LT. i+1) then
                    mul=mul*j
                    j=j+1
                    print *, 'mul=', mul
                    go to 20
                end if

            sumup=sumup+mul
            print *, 'sumup=', sumup
            go to 10
        end if
        print *, 'sumup finally=', sumup
end program
